home *** CD-ROM | disk | FTP | other *** search
- Path: po.CWRU.Edu!mab22
- From: mab22@po.CWRU.Edu (Michael A. Balfour)
- Newsgroups: comp.lang.c
- Subject: Data Conversions
- Date: 8 Feb 1996 00:23:53 GMT
- Organization: Case Western Reserve University, Cleveland, OH (USA)
- Message-ID: <4fbfqp$fsk@madeline.INS.CWRU.Edu>
- Reply-To: mab22@po.CWRU.Edu (Michael A. Balfour)
- NNTP-Posting-Host: kanga.ins.cwru.edu
-
-
- (in case I haven't asked enough questions yet)
-
- Are there any pre-existing routines to do data conversions? Before you
- start bringing up printf and atol, let me explain a little further. I'm
- looking for routines that can just as easily push an 8-byte Big-Endian
- number into an EBCDIC string as transforming an ASCII string to a COMP-3
- (COBOL datatype), or possibly any of the above to a VARCHAR to get
- loaded into Oracle.
-
- I've tried writing a routine with the following API:
- void Translate(long dataType,long length,char *inData,
- long outDataType, long outLength,char *outData);
-
- Unfortunately, it's either suffered speed drawbacks or become very
- complicated in terms of adding data types. (One function is needed for
- every type of datatype conversion)
-
- Surely, somebody has run into this problem before and solved it?
-
- For all the COBOL mainframe programs out there, *somebody* must have
- written C programs to deal with them and created a nice set of
- public-domain translation routines, right?
-
- Please e-mail a reply along with posting, if possible.
-
- Thanks,
-
- Mike Balfour
- --
- ----------------------------------+--------------------------------
- Mike Balfour, Partner | BS/MS Candidate - ECMP
- Overload Engineering | Case Western Reserve University
- "New Ideas for a Brighter Future" | Cleveland, OH
-